]> dgit.raspbian.org Git - gnome-shell.git/commit
st/scroll-view: Make fade effect take ClutterMargin
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 3 Feb 2021 11:07:34 +0000 (12:07 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Mar 2021 22:02:56 +0000 (22:02 +0000)
commitf60a469a34e2e3973caa83a4bd41996aa3cf2d1d
tree18e45183d3abc9d16638cfbda0ef5a067b170317
parent8cb3825d4817de35a839639a434b8ed0126206bf
st/scroll-view: Make fade effect take ClutterMargin

Instead of taking just vertical/horizontal offsets, take a ClutterMargin
to allow us set the fade offsets on each direction specifically. Also,
handle negative values in margins, the fade effect will run in the negative
space left by the scrollview padding instead. Another difference now is
that areas outside the extents of the effect will be transparent, instead
of the effect ending abruptly past the given extents.

This will be used by the app grid, in order to selectively let see either
of next/prev pages while navigating.

While at it, fix code style issues in st_scroll_view_update_fade_effect(),
and clean up unused variables from the GLSL code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1630>
js/ui/appDisplay.js
src/st/st-scroll-view-fade.c
src/st/st-scroll-view-fade.glsl
src/st/st-scroll-view.c
src/st/st-scroll-view.h